package com.by_man.presenter.module_health_records;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;

import com.by_man.presenter.R;
import com.by_man.presenter.SharedApplication;
import com.by_man.presenter.module_health_records.access_records.AccessRecordsActivity;
import com.by_man.presenter.module_health_records.attention.AttentionContentActivity;
import com.by_man.presenter.module_health_records.upload_health_records.UploadHealthRecordsActivity;

/**
 * 健康档案
 * Created by man on 2017-02-24.
 */
public class HealthRecordsFragment extends Fragment {
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_health_records, container, false);
        ImageButton uploadBtn = (ImageButton) view.findViewById(R.id.button_upload_records);
        ImageButton accessBtn = (ImageButton) view.findViewById(R.id.button_access_records);
        ImageButton attentionBtn = (ImageButton) view.findViewById(R.id.button_attention);
        uploadBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), UploadHealthRecordsActivity.class);
                startActivity(intent);
            }
        });

        accessBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), AccessRecordsActivity.class);
                startActivity(intent);
            }
        });

        attentionBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), AttentionContentActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }

    private void initView() {

    }
}
